<template>
	<gracePage statusBarBG="#f4f4f4">
		<view slot="gHeader" style="background-color: #F4F4F4;">
			<view class="grace-header-body">
				<!-- 返回按钮 -->
				<view class="grace-header-icons grace-icons icon-arrow-left " @tap="appFn.navigateBackFn"></view>
				<!-- 中间内容 -->
				<view class="grace-header-content-noflex text-center"><text class=" grace-h4">套装列表</text></view>
				<!-- 设置按钮 -->
				<view class="grace-header-icons font-size-34 "></view>
			</view>
		</view>
		<view slot="gBody" class="grace-body">
			<view class="grace-list my-3" v-for="(goods, indexItem) in getGoodsList" :key="indexItem" @click="shopInfoFn(goods.goods_id)">
				<view class="grace-list-items">
					<view class="my-list-image ucenter-face grace-relative"><image class="my-list-image ucenter-face-image" :src="goods.goods_thumb" mode="widthFix"></image></view>
					<view class="grace-list-body">
						<view class="grace-list-title">
							<text class="grace-h4 grace-ellipsis">{{ goods.goods_name }}</text>
						</view>
						<view class="grace-list-title pb-1">
							<text class="my-list-title-text grace-black9 grace-text">{{ goods.goods_brief }}{{ goods.goods_brief }}{{ goods.goods_brief }}</text>
						</view>
						<view class="grace-rows grace-flex-vbottom" >
							<view class="grace-rows grace-flex-vbottom" >
								<text class="grace-text-small grace-red">￥</text>
								<text class="grace-h5 grace-red">{{ goods.shop_price }}</text>
							</view>
							<text class="grace-text-small grace-gray grace-line-through">￥{{ goods.market_price }}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</gracePage>
</template>
<script>
import gracePage from '@/graceUI/components/gracePage.vue';
export default {
	data() {
		return {
			getGoodsList: []
		};
	},
	components: {
		gracePage
	},
	onLoad() {
		this.__init();
	},
	methods: {
		async __init() {
			let data = await this.$HTTP.post('/api/api.php', { act: 'get_suitlist' });
			console.log('data', data);
			this.getGoodsList = data;
		},
		// 进入商品详情
		shopInfoFn: function(id) {
			uni.navigateTo({
				url: '/pages/shop/shopInfo/shopInfo?id='+id
			});
		},
	}
};
</script>
<style scoped>
.my-list-title-text {
	display: block;
	line-height: 30rpx;
}
</style>
